<? //include"cek_sesi.php"; ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Laporan Progres Report</title>
<style type="text/css"></style>
<link href="../lib/styles.css" rel="stylesheet" type="text/css">

</head>

<body>
<p>

  <? include"../koneksi/koneksi.php"; ?>
</p>
<table style="border-collapse: collapse;" width="1150" border="1" bordercolor="#cccccc" cellpadding="3" cellspacing="0" align="center">
  <tr>
    <td>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="16%"><img src="../gambar/logo_dic.gif" alt="logo" width="124" height="67" /></td>
        <td width="73%" class="texttitle02C"><div align="center" class="texttitle02E">
          <div align="left" class="texttitle02B">&nbsp;&nbsp;&nbsp;PT. PARDIC JAYA CHEMICALS</div>
        </div></td>
        <td width="11%" class="texttitle02C"><div align="center"><img src="../gambar/logo.png" alt="logo" width="67" height="66" /></div></td>
      </tr>
      <tr>
        <td colspan="3"><hr color="#CCCCCC" size="1" /></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 	  
        <td width="64%" height="35"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="3%">&nbsp;</td>
            <td width="13%" class="texttitle1ungu"><div align="left"></div></td>
            <td width="2%"><div align="center"></div></td>
            <td width="41%"><div align="left"></div></td>
            <td width="16%">&nbsp;</td>
            <td width="25%">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu"><div align="left">Perihal</div></td>
            <td><div align="center">:</div></td>
            <td><div align="left">Progres Report Training </div></td>
            <td colspan="2"><span class="texttitle1ungu">Tangerang,</span> <? echo date('j F Y');?> </td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu">Periode</td>
            <td><div align="center">:</div></td>
            <td><?
$tgl_indo1=$tanggal1.'-'.$bulan1.'-'.$tahun1;
$tgl_indo2=$tanggal2.'-'.$bulan2.'-'.$tahun2;
//menyesuaikan format tgl dng format tgl di mysql
$tgl_mysql1=$tahun1.'-'.$bulan1.'-'.$tanggal1;
$tgl_mysql2=$tahun2.'-'.$bulan2.'-'.$tanggal2;
echo"$tgl_indo1 s/d $tgl_indo2"; ?></td>
            <td class="texttitle1ungu">Status Training </td>
            <td><div align="left">:&nbsp;&nbsp;
			<?
			if($status=='ok')
			{ echo"OK"; }
			elseif($status=='mundur')
			{ echo"Mundur"; }
			elseif($status=='proses')
			{ echo"Proses"; }?></div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu">&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td></td>
            <td colspan="5" height="10"></td>
          </tr>
          <tr>
            <td colspan="6">
			
              <table width="99%" border="1" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">
                
                <tr bgcolor="#000080" class="textmenu4a">
                  <td width="2%" rowspan="2"><div align="center">No</div></td>
                  <td width="13%" rowspan="2"><div align="center"> Training</div></td>
                  <td colspan="2"><div align="center">Tanggal</div></td>
                  <td width="13%" rowspan="2">Waktu</td>
                  <td colspan="2"><div align="center">Peserta</div></td>
                  <td width="7%" rowspan="2"><div align="center">Instruktur</div></td>
                  <td width="5%" rowspan="2"><div align="center">Budget</div></td>
                  <td width="10%" rowspan="2"><div align="center">Klasifikasi</div></td>
                  <td width="10%" rowspan="2"><div align="center">Reschedule</div></td>
                  <td width="11%" rowspan="2"><div align="center">Alasan </div></td>
                  <td width="5%" rowspan="2"><div align="center">Hours</div></td>
                  <td width="5%" rowspan="2"><div align="center">Man Hours </div></td>
                  </tr>
                <tr bgcolor="#000080" class="textmenu4a">
                  <td width="4%"><div align="center">Plan</div></td>
                  <td width="6%"><div align="center">Aktual</div></td>
                  <td width="4%">Plan</td>
                  <td width="5%">Aktual</td>
                  </tr>
                <tr class="texttitle">
  <?
 $limit=200;
 if(empty($halaman)){
 $offset=0;
 $halaman=1;}
 else{
 $offset=($halaman-1) * $limit; }
 
 $tampil=mysql_query("select * from karyawan k, training t, seksi s, detail_training dt,
 					materi m, jobdesc_kualifikasi jk
					where
					k.kd_seksi=s.kd_seksi and
					dt.nik=k.nik and t.no_training=dt.no_training and m.kd_materi=jk.kd_materi and jk.nodet_jobdesc=t.nodet_jobdesc
					and	t.tgl_training between '$tgl_mysql1' and '$tgl_mysql2'
					and t.status_training='$_POST[status]' group by t.no_training
					limit $offset,$limit");
 $no=0;
 while($ada=mysql_fetch_array($tampil))
 {
 	if($j==0){
	echo"<tr bgcolor=#eeedee>";
	$j++;}
	else{
	echo"<tr bgcolor='#ffffff'>";
	$j--;}
	$no++;
?> 

                  <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$no"; ?></div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="left"><a href="lap_det_progress.php?no_training=<? echo"$ada[no_training]"; ?>" target="_blank"><? echo"$ada[nm_training]"; ?></a></div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center">
				
				  
				  <? 
				  $hs1=explode("-",$ada[tgl_training],3);
				  echo"$hs1[2]-";
				  echo"$hs1[1]-";
				  echo"$hs1[0]"; 
				  //echo"$ada[tgl_training]"; ?></div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center">
			<?
			if($status=='ok')
			{
				if($ada[tgl_mundur]<=0)
				{ 
				$hs2=explode("-",$ada[tgl_training],3);
				  echo"$hs2[2]-";
				  echo"$hs2[1]-";
				  echo"$hs2[0]"; 
				//echo"$ada[tgl_training]"; 
				}
				else
				{
				$hs3=explode("-",$ada[tgl_mundur],3);
				  echo"$hs3[2]-";
				  echo"$hs3[1]-";
				  echo"$hs3[0]";  
				//echo"$ada[tgl_mundur]"; 
				}
			}
			?>
			</div></td>
                  <td align="left" valign="top" class="texttitle14">
				  <? 
				  $jam1=$ada[jam_training];
				  
				  echo"$ada[jam_training]"; ?> s/d <? echo"$ada[jam_selesai]"; ?></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$ada[quota_peserta]"; ?></div>
                    <div align="center"></div>
                    <div align="center"></div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center">
                    <?
	$hit_header=mysql_query("select k.nik from detail_training dt, training t,karyawan k 
				  where dt.no_training=t.no_training and k.nik=dt.nik and t.no_training='$ada[no_training]'");
	//$cek_hit=mysql_fetch_array($cek);
	$cek_header=mysql_num_rows($hit_header);
	{ echo"$cek_header"; }			   
	?>
                  </div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center">
                    <? include"nm_trainer.php";?>
                  </div></td>
	  <td align="left" valign="top" class="texttitle14"><div align="left"><? echo"$ada[biaya]"; ?></div></td>
      <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$ada[klasifikasi_training]"; ?></div></td>
      <td align="left" valign="top" class="texttitle14"><div align="center">
        <?
			if($status=='mundur')
			{ echo"$ada[tgl_mundur]"; }
			?>
      </div></td>
      <td align="left" valign="top" class="texttitle14"><div align="center">
        <?
		$ket=$ada[keterangan];
			if(!empty($ket))
			{
			echo"$ada[keterangan]";
			}
			?>
      </div></td>
      <td align="left" valign="top" class="texttitle14">
	    <div align="center">
	      <?
	  $jam_awal=$ada[jam_training];
	  $jam_selesai=$ada[jam_selesai];
	  $jum_jam=$jam_selesai-$jam_awal;
	  ?>
	      <? echo"$jum_jam"; ?> Jam</div></td>
                <td align="left" valign="top" class="texttitle14">
				  <div align="center">
				    <?
				$man_hours=$cek_header * $jum_jam;
				echo"$man_hours";
				?>
				    Jam</div></td>
                </tr>
<? } ?>              
       </table>		  			  </td>
            </tr>
          <tr>
            <td colspan="6"></td>
            </tr>
          <tr>
            <td colspan="6"></td>
            </tr>
        </table>		</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>
<table width="99%" border="0" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">   
<tr>
<?
$lihat2=mysql_query("select * from karyawan k, training t, seksi s, detail_training dt
					where
					k.kd_seksi=s.kd_seksi and
					dt.nik=k.nik and t.no_training=dt.no_training
					and	t.tgl_training between '$tgl_mysql1' and '$tgl_mysql2'
					and t.status_training='$_POST[status]' group by t.no_training");
$jumbaris=mysql_num_rows($lihat2);
?>
<td width="4%"><div align="left"><span class="texttitle14">&nbsp;Jumlah Training : <? echo"$jumbaris"; ?></span></div></td>
</tr>
</table>
	
	
	
	</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="31%">
          <div align="left" class="texttitle12"></div></td>
        <td width="36%"><div align="right" class="texttitle12">&nbsp;</div></td>
        <td width="33%">&nbsp;</td>
      </tr>
      <tr>
        <td class="texttitle12"><div align="left">APPROVED BY</div></td>
        <td class="texttitle12"><div align="left">CHECKED BY</div></td>
        <td class="texttitle12"><div align="left">PREPARED BY</div></td>
      </tr>
      <tr>
        <td><div align="left"></div></td>
        <td class="texttitle12"><div align="right" class="style14"></div></td>
        <td class="texttitle12">&nbsp;</td>
      </tr>
      <tr>
        <td height="29"><div align="left"></div></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
<?
$tampil2=mysql_query("select k.nm_karyawan from karyawan k,admin a
					where k.nik=a.nik and a.nik='$nomor_induk_karyawan'");
$hs2=mysql_fetch_array($tampil2);
{ ?> 	  
	  
        <td>(Eddy Murphi)<hr size="1" width="80%" align="left" /></td>
        <td>(Muh Hasan)<hr size="1" width="80%" align="left" /></td>
        <td>(<? echo"$hs2[nm_karyawan]"; ?>)<hr size="1" width="80%" align="left" /></td>
      </tr>
<? } ?>
      <tr>
        <td>DATE : </td>
        <td>DATE : </td>
        <td>DATE : </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>


</td>
  </tr>
</table>
</body>
</html>
